import axios from 'axios';
let token='abcdfddsfds';
axios.interceptors.request.use((config)=>{
  config.headers['X-Authoriaztion'] ='Bearer '+token;
  return config;
});

axios.interceptors.response.use((config)=>{
  switch(config.status){
    case 200:
      return config.data; 
    default:
      alert('api调用出错');     
  }
})
export default axios;